package com.basic.java.threads.extendthread;

/**
 * 类
 * 创建时间：2022/4/12 22:44
 *
 * @author gejin
 */
// 继承Thread 类
public class ExtendsThread extends Thread {
    @Override
    public void run() {
        //重写run 方法
        for (int i = 0; i < 1000; i++) {
            System.out.println("ExtendsThread线程执行----" + i);
        }
    }

    public static void main(String[] args) {
        // 创建线程对象
        ExtendsThread extendsThread = new ExtendsThread();
        extendsThread.start();
        for (int i = 0; i < 1000; i++) {
            System.out.println("main主线程执行-----" + i);
        }
    }
}
